styleproperties: Add a warning
authorBenjamin Otte <otte@redhat.com>
Sat, 14 Jan 2012 16:20:15 +0000 (17:20 +0100)
committerBenjamin Otte <otte@redhat.com>
Thu, 2 Feb 2012 02:14:00 +0000 (03:14 +0100)
GtkStyleProperties stores computed values. Make sure it does.

gtk/gtkstyleproperties.c

index a92d72219e99c8cbcec781a48311e88d4926e596..4643a93a2c931a56c1f6cee31ee240abda09eb82 100644 (file)
@@ -439,6 +439,8 @@ _gtk_style_properties_set_property_by_property (GtkStyleProperties  *props,
   PropertyData *prop;
   GValue *val;
 
+  g_return_if_fail (G_VALUE_TYPE (value) == _gtk_css_style_property_get_computed_type (style_prop));
+
   priv = props->priv;
   prop = g_hash_table_lookup (priv->properties, style_prop);